﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Beeldbankmvc.Models;

namespace Beeldbankmvc.ViewModels
{
    public class OrderViewModel
    {
        public int Id { get; set; }
        public string User { get; set; }
        public decimal OrderPrice { get; set; }
        public string OrderNumber { get; set; }
        public string Purpose { get; set; }
        public DateTime? OrderDate { get; set; }
        public string Comment { get; set; }

        public List<BEELDBANK_ORDERREGEL> orderregelObjects { get; set; }

        OrderRepository orderRepository = new OrderRepository();

        public OrderViewModel(BEELDBANK_ORDER order)
        {
            // find all related order regel items
            orderregelObjects = orderRepository.FindAllItemsFromOrder(order.Id).ToList();
        }

        public OrderViewModel()
        {
            // Constructor for index
        }

    }
}